#ifndef SYMPHONIE_H
#define SYMPHONIE_H


#include "functions.h"
#include "ex_SPL.h"
#include "var_def.h"
#include"RF_functions.h"
#include "Gui_functions.h"
#include "plot2d_dialog.h"




class Symphonie : public QDialog
{
    Q_OBJECT

public:
    Symphonie(QWidget *parent = 0, Qt::WFlags flags = 0);
    int Active_file_database;

    Plot_3D *test3D;
    void SetBackgroundImage(QDialog *SymphonieClass);
    ~Symphonie();
private:
    Ui::SymphonieClass ui;
protected:
    void contextMenuEvent(QContextMenuEvent *event);
public slots:

private slots:
    void on_ui_SelectMenu_currentChanged(int value);
    void changeStyle(const QString &styleName);
    void on_SPL_combo_1_currentIndexChanged();
    void on_SPL_slider_1_valueChanged();
    void on_Workspace_active_clicked();
    void on_Add_file_clicked();

    void on_AboutQt_clicked();
    int on_SPL_process_saveas_clicked();
    void on_SPL_compute_optim_clicked();
    void on_SPL_update_plot_clicked();
    void Select_skin_f();

    void on_SPL_valid_stateChanged();
    void Plot_SPL_curve(Plot_2D  *qwtPlot,int i, int j, int k, QString Xlabel, QString Y1label, QString Y2label);

    void Add_message_to_status_windows_QstringList(QStringList msg);
    void Add_message_to_status_windows_Qstring(QString msg);
    void Add_message_to_status_windows(QString msg);

    void showContextMenuFor_SelectedFile(const QPoint &pos);
    void showContextMenuFor_SPL_extract_result(const QPoint &pos);
    void showContextMenuFor_List_file_in_database(const QPoint &pos);
    void showContextMenuFor_Main_disp_message(const QPoint &pos);


    void ListView_SelectAll(const QString &text);
    void ListView_DeSelectAll(const QString &text);
    void ListView_Remove(const QString &text);
    void ListView_Copy(const QString &text);

    void on_List_file_in_database_itemPressed();

    void Open_workspace();
    void SaveAs_workspace();
    void Save_workspace();
    void New_workspace();



private:
    template<class T> void Add_Workspace_file_infos(QListWidget *target,T *data);
    template<class T> void Add_file_infos(QTreeView *target,T *data);
    template<class T> void  Update_process_windows(T *data);
    QToolBox *ui_SelectMenu;
    QStackedWidget *ui_StackedTabs;
    QTabWidget *tabSPL;
    QPushButton *Add_file;


    QListWidget *selected_file;
    QPushButton *Workspace_active;
    QPushButton *SPL_compute_optim;
    QPushButton *SPL_process_saveas;
    QPushButton *Select_skin;
    QCheckBox *SPL_chkbox_1;

    QComboBox *SPL_combo_1;
    QComboBox *SPL_optims_computed_on;
    QLineEdit *SPL_optim_target;
    QLineEdit *workspace_activefile_label;
    QProgressBar *loading_file_progress_bar;
    QProgressBar *loading_file_progress_bar_2;
    QListWidget *Main_disp_message;
    QListWidget *Workspace_infos_file;
    QPushButton *AboutQt;
    QPushButton *SPL_update_plot;
    QTextEdit *Welcome_about;
    QListWidget *List_file_in_database;
    QListWidget *SPL_plot3D_widget;
    QListWidget *List_SPL_Infos_dataset;
    QSlider *SPL_slider_1;

    QPushButton *pushButtonwdiget;
    Plot_2D  *qwtPlot;
    Plot_2D  *qwtPlot2;
    Plot_2D  *qwtPlot3;
    Plot_2D  *qwtPlot4;
    Plot_3D  *Plot_3D_tooldbar;
};

#endif // SYMPHONIE_H
